<script setup>

const prop = defineProps({
	mode: {
		type: String,
		default: 'center'
	},
	dataList: {
		type: Array,
		default: []
	}
})

const doClickHandle = (name) => {
	var item = prop.dataList.findIndex(item => item.name === name)
	uni.navigateTo({ url: `/pages` })
}
</script>
<template>
	<view class="xb-popop">
		<uv-popup :mode="mode" custom-style="height: 200px">
			<uv-grid :col="4" :border="false" @click="doClickHandle">
				<uv-grid-item v-for="(item,index) in dataList" :key="index">
					<uv-icon :customStyle="{paddingTop:20+'rpx'}" :name="item.name" :size="22"></uv-icon>
					<text class="grid-text">{{item.title}}</text>
				</uv-grid-item>
			</uv-grid>
		</uv-popup>
	</view>
</template>
<style lang="scss">

</style>
